<div>
    <br/>
    <ol class="breadcrumb">
        <li class="active">
            <span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;
            <mainpage></mainpage>
        </li>
        <li class="active">运维工作台 / 参数配置管理 / 规则参数管理 / 红名单管理</li>
    </ol>

    <ul class="nav nav-tabs marT15">
        <li role="presentation" class="active">
            <a href="#/redListimport" style="color: #555;">红名单导入</a>
        </li>
        <li role="presentation">
            <a href="#/redListManage" style="color:#555;">红名单列表</a>
        </li>
    </ul>

    <div class="rightbar">
        <form id="serviceEnd" class="showEle sign1 clearfix form-inline">
            <div class="marR10 marT15 left">
                <span class="search-name">时间选择</span>
                <div class="controls ">
                    <input type="text" ng-model="searchData.startDate" placeholder="" name="startDate" style="display: none;">
                    <input type="text" ng-model="searchData.endDate" placeholder="" name="endDate" style="display: none;">
                    <div class="input-prepend input-group">
                        <span class="add-on input-group-addon">
                            <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
                        </span>
                        <input type="text" readonly style="width: 155px" id="redListDate" class="form-control" />
                        <span class="input-group-addon" ng-click='clearTime()'>清空</span>
                    </div>
                </div>
            </div>
            <div class="left marR10 marT15">
                <span class="search-name">导入文件</span>
                <input type="text" class="form-control1" placeholder="请输入文件名称" ng-keyup='search($event)' ng-model="searchData.fileName">
            </div>
            <div class="left marT15 marR10">
                <span class="search-name">导入人</span>
                <input type="text" class="form-control1" placeholder="请输入导入人" ng-keyup='search($event)' ng-model="searchData.userName">
            </div>
            <a href="javascript:;" class=" btn btn-sm btn-primary left marT15" id="search" ng-click='search()'>
                <span class="glyphicon glyphicon-search"></span>
            </a>
        </form>

        <div class="row marT15">
            <div class="left center" style="margin: 0px 20px 0px 15px;">
                <input class="btn-danger btn btn-sm" type="button" value="删除" data-toggle="modal" data-target="" ng-click="changeStstus('删除')"
                    id="add">
            </div>
            <div class="left center" style="margin: 0px 20px 0px 0px;">
                <input class="btn-success btn btn-sm" type="button" value="生效" data-toggle="modal" data-target="" ng-click="changeStstus('生效')">
            </div>
            <div class="left center" style="margin: 0px 20px 0px 0px;">
                <input class="btn-warning btn btn-sm" type="button" value="失效" data-toggle="modal" data-target="" ng-click="changeStstus('失效')">
            </div>
            <div class="left center" style="margin: 0px 20px 0px 0px;">
                <input class="btn-primary btn btn-sm" type="button" value="导入" data-toggle="modal" data-target="#add1" ng-click="qix()">
            </div>
        </div>

        <div class="table-box">
            <table class="table table-bordered table-striped text-center bg-info marT15">
                <thead>
                    <tr class="info">
                        <th class="text-center">
                            <input type="checkbox" style="vertical-align: text-bottom;" ng-model="select_all" ng-change="selectAll()"> 全选
                        </th>
                        <th class="text-center">序号</th>
                        <th class="text-center">导入文件名称</th>
                        <th class="text-center">导入时间</th>
                        <th class="text-center">导入人</th>
                        <th class="text-center">状态</th>
                    </tr>
                </thead>
                <tbody id="appList">
                    <tr ng-repeat="Item in result">
                        <td class="w70">
                            <input type="checkbox" ng-model="Item.checked" ng-change="selectOne()">
                        </td>
                        <td>{{ $index+1 }}</td>
                        <td class="w115">{{Item.fileName}}</td>
                        <td class="w85">{{Item.uptime}}</td>
                        <td class="w70">{{Item.userName}}</td>
                        <td class="w85">
                            <span ng-if='"0"==Item.status'>失效</span>
                            <span ng-if='"1"==Item.status'>有效</span>
                        </td>
                    </tr>

                </tbody>
            </table>

        </div>
        <page></page>
    </div>
</div>

<!--添加程序弹窗-->
<div class="modal fade" id="add1" tabindex="-1" role="dialog" aria-labelledby="add11">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">导入红名单</h4>
            </div>
            <div class="modal-body bg-info" style="padding-bottom: 0px;">
                <div class="clearfix row marT15">
                    <span class="col-xs-3">
                        <div class="input-group text-right">
                            导入文件格式：
                        </div>
                    </span>
                    <span class="col-xs-9">
                        <label class="radio-inline">
                            <input type="radio" name="inlineRadioOptions" value="option1" id="txt" checked> txt文件
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="inlineRadioOptions" value="option1" id="csv"> csv文件
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="inlineRadioOptions" value="option1" id="excel"> excel文件
                        </label>
                    </span>
                </div>
                <div class="row clearfix marT15">
                    <span class="col-xs-3">
                        <div class="input-group text-right">
                            请选择文件：
                        </div>
                    </span>
                    <span class="col-xs-9">
                        <form name="form_upload" id="uploadForm" method="post" enctype="multipart/form-data">
                            <input name="file" type="file" id="file" />
                            <input name="fileType" type="text" value="红名单" style="display: none;" />
                        </form>
                        <br>
                        <p>温馨提示：txt文件格式：手机号码|红名单用户说明，csv格式和xlsx文件格式；A列为用户号码，B列为红名单用户说明。</p>

                    </span>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button id="uploadBtn" type="button" class="btn btn-primary btn-sm" ng-click="daoru()">导入</button>
            </div>
        </div>
    </div>
</div>
<!-- 添加程序结束 -->
<!-- 编辑程序 -->
<div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="edit">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="add11">添加</h4>
            </div>
            <div class="modal-body">
                <div class="clearfix">
                    <span class="col-xs-6">
                        <div class="input-group  left">
                            <span class="input-group-addon">敏感词名称 ：</span>
                            <input type="text" class="form-control" placeholder="法轮功">
                        </div>
                    </span>
                    <span class="col-xs-6">
                        <div class="input-group  left">
                            <span class="input-group-addon">状态</span>
                            <select class="form-control">
                                <option value="0">待生效</option>
                                <option value="1">生效</option>
                            </select>
                        </div>
                    </span>
                </div>
                <div class="marT15 marB15 clearfix">
                    <span>
                        <label class="left">
                            <span>敏感词过滤说明 ：</span>
                        </label>
                        <textarea class="left form-control">邪教过滤</textarea>
                    </span>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary btn-sm">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--编辑程序结束-->
<!-- 参数添加结束 -->
<!-- 提示框 -->
<div class="modal fade" id="delete">
    <div class="modal-dialog">
        <div class="modal-content message_align">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">提示信息</h4>
            </div>
            <div class="modal-body">
                <p>您确认删除吗？</p>
            </div>
            <div class="modal-footer">
                <input type="hidden" id="url" />
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a ng-click='changeStstus("key")' class="btn btn-primary" data-dismiss="modal">确定</a>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- 提示框结束 -->
<!-- 加载提示框 -->
<div id="statusTip" ng-style='statusLoad'>
    <div id="statusBox">
        <img src="img/load.gif" style="width:50px; height:50px; position: relative; left:55px; margin-bottom: 15px;">
        <p style="color: #fff;">正在{{loadStatus}}，请稍候....</p>
    </div>
</div>
<!-- 加载框 -->
<span class='loaded' ng-show='loaded'>
    <img src="img/load.gif">
</span>
<!-- 加载框 完成-->